import javax.print.attribute.standard.MediaSize;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-03-16
 * Time: 23:07
 */
class Outclass {
    public int data1 = 1;
    public int data2 = 2;
    public static int data3 = 3;

    class Innerclass {
        public int data1 = 100;
        public int data4 = 12;
        public int data5 = 14;
        public static int data6 = 6;

        public void func1() {
            //System.out.println("InnerClass:func1()");
            System.out.println(data1);
            System.out.println(data2);
            System.out.println("=============");
            System.out.println("外部内同名成元素属性:" + Outclass.this.data1);

        }
    }

    public void func() {
        System.out.println("Outclass func()");
    }
}

public class Test {
    public static void main(String[] args) {
        Outclass outclass = new Outclass();
        System.out.println(outclass.data1);
        System.out.println(outclass.data2);

        System.out.println(new Outclass().data1);
    }

    public static void main1(String[] args) {
        Outclass outclass = new Outclass();
        Outclass.Innerclass innerclass = outclass.new Innerclass();
        innerclass.func1();
        //Innerclass innerclass = new nnerclass();
    }
}

